package org.wanho.txy.ems.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * Author：汤小洋
 * Date：2023-05-10 15:26
 * Description：<描述>
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {

    private Integer id;
    private String username;
    private String password;
    private String name;
    private Integer age;
    private Integer status;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date registDate;
    private String avatar;

    public User(String username, String password, String name, Integer age) {
        this.username = username;
        this.password = password;
        this.name = name;
        this.age = age;
    }

    public User(Integer id, String username, String password, String name, Integer age) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.name = name;
        this.age = age;
    }

    public User(String username, String password, String name, Integer age, String avatar) {
        this.username = username;
        this.password = password;
        this.name = name;
        this.age = age;
        this.avatar = avatar;
    }
}
